Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix!: leverage.MaxBorrow return zero instead of failing when there is no more to borrow #1694

Merged
merged 21 commits into from
Jan 19, 2023

Conversation

robert-zaremba
Copy link
Member

Description

ref: #1690 (comment)


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • added appropriate labels to the PR
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

Copy link
Collaborator

@gsk967 gsk967 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gsk967
Copy link
Collaborator

gsk967 commented Jan 6, 2023

@robert-zaremba can you fix failing tests

proto/umee/leverage/v1/tx.proto Outdated Show resolved Hide resolved
@robert-zaremba robert-zaremba changed the title feat!: leverage.MaxBorrow return zero instead of failing when there is no more to borrow fix!: leverage.MaxBorrow return zero instead of failing when there is no more to borrow Jan 12, 2023
@robert-zaremba robert-zaremba requested a review from a team as a code owner January 19, 2023 15:37
@codecov-commenter
Copy link

codecov-commenter commented Jan 19, 2023

Codecov Report

Merging #1694 (53a4387) into main (38c2d04) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1694      +/-   ##
==========================================
- Coverage   57.55%   57.53%   -0.03%     
==========================================
  Files          75       75              
  Lines        7925     7928       +3     
==========================================
  Hits         4561     4561              
- Misses       3014     3016       +2     
- Partials      350      351       +1     
Impacted Files Coverage Δ
x/leverage/keeper/limits.go 59.29% <ø> (-1.40%) ⬇️
x/leverage/keeper/keeper.go 69.27% <100.00%> (+0.16%) ⬆️
x/leverage/keeper/msg_server.go 79.06% <100.00%> (-0.52%) ⬇️

CHANGELOG.md Outdated Show resolved Hide resolved
@toteki
Copy link
Member

toteki commented Jan 19, 2023

A couple bits of cleanup, but looks good overall

@adamewozniak
Copy link
Collaborator

imo we should probably not scope creep this into v4

CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Show resolved Hide resolved
Co-authored-by: Adam Moser <63419657+toteki@users.noreply.github.com>
Copy link
Member

@toteki toteki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we got everything - once that uToken check is hopefully added to queryMaxWithdraw, should be good to merge

@mergify mergify bot merged commit 3b9f545 into main Jan 19, 2023
@mergify mergify bot deleted the robert/max-borrow-zero branch January 19, 2023 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants